home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / dtime / data.1 / DTWINVER.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-08  |  1.8 KB  |  58 lines

  1. /*
  2. Module : DTWINVER.H
  3. Purpose: Interface of a function to perform
  4.          version detection on OS
  5. Created: PJN / DATE/2 / 11-05-1996
  6. History: None
  7.  
  8. Copyright (c) 1996 by PJ Naughter.  
  9. All rights reserved.
  10.  
  11. */
  12.  
  13. #ifndef __DTWINVER_H__                                          
  14.  
  15. ////////////////////////////////// Includes ///////////////////////////////////
  16. #include "win32sup.h"
  17.  
  18.  
  19.  
  20. ////////////////////////////////// defines ////////////////////////////////////
  21.  
  22. //values which get stored in [OS_VERSION_INFO].dwEmulatedPlatformId 
  23. //and [OS_VERSION_INFO].dwUnderlyingPlatformId 
  24. const DWORD PLATFORM_WIN32S =            0;
  25. const DWORD PLATFORM_WINDOWS95 =         1;
  26. const DWORD PLATFORM_NT_WORKSTATION =    2; 
  27. const DWORD PLATFORM_WINDOWS =           3;  
  28. const DWORD PLATFORM_WINDOWSFW =         4;
  29. const DWORD PLATFORM_DOS =               5;
  30. const DWORD PLATFORM_NT_SERVER =         6;
  31. const DWORD PLATFORM_NT_ADVANCEDSERVER = 7;
  32.  
  33.  
  34. typedef struct _OS_VERSION_INFO
  35. {
  36.   DWORD dwOSVersionInfoSize;
  37.                   
  38.   //What version of OS is being emulated
  39.   DWORD dwEmulatedMajorVersion;
  40.   DWORD dwEmulatedMinorVersion;
  41.   DWORD dwEmulatedBuildNumber;
  42.   DWORD dwEmulatedPlatformId;
  43.   TCHAR szEmulatedCSDVersion[128];
  44.  
  45.   //What version of OS is really running                 
  46.   DWORD dwUnderlyingMajorVersion;
  47.   DWORD dwUnderlyingMinorVersion;
  48.   DWORD dwUnderlyingBuildNumber;
  49.   DWORD dwUnderlyingPlatformId;   
  50.   TCHAR szUnderlyingCSDVersion[128];
  51. } OS_VERSION_INFO, *POS_VERSION_INFO, FAR *LPOS_VERSION_INFO;
  52.                                           
  53.                                           
  54. /////////////////////////////// Functions /////////////////////////////////////
  55. BOOL EXPORT16 GetOSVersion(LPOS_VERSION_INFO lpVersionInformation);
  56.  
  57.  
  58. #endif //__DTWINVER_H__